package com.tidc.consumer9001;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

@EnableDiscoveryClient
@SpringBootApplication
//@EnableHystrixDashboard
@EnableFeignClients(basePackages= {"com.tidc"})
@EnableCircuitBreaker
//里面一个轮询策略一个服务名 这个注解是为某个微服务自定义一个LB策略
//@RibbonClient(name="provider-8001",configuration= MySelfRule.class)
public class Consumer9001Application {
	public static void main(String[] args) {
		SpringApplication.run(Consumer9001Application.class, args);
	}
//	@Bean
//	@LoadBalanced //默认使用轮询
//	public RestTemplate restTemplate(){
//		return new RestTemplate();
//	}
}
